home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 September
/
Chip_2002-09_cd1.bin
/
sharewar
/
slunec
/
app
/
httrack.exe
/
{app}
/
src_win
/
WinHTTrack
/
Shell.h
< prev
next >
Wrap
C/C++ Source or Header
|
2002-05-16
|
6KB
|
224 lines
// Shell.h : main header file for the SHELL application
//
#if !defined(AFX_SHELL_H__ED81E637_E017_11D1_A97E_006097BC6150__INCLUDED_)
#define AFX_SHELL_H__ED81E637_E017_11D1_A97E_006097BC6150__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
/* basic HTTrack defs */
extern "C" {
#include "htsglobal.h"
#include "htsopt.h"
}
// Site actuel de HTTrack
#define HTTRACK_WEB "http://www.httrack.com"
//
// connectΘ via HTTrack? (dΘfini dans projet)
#define USE_RAS 1
//
// sleep (taux de refresh) en ms
#define HTS_SLEEP_WIN 100
#include "resource.h" // main symbols
#include "cpp_lang.h"
// Ras
#if USE_RAS
#include "RasLoad.h"
#endif
#include "MainTab.h"
// helper launcher
#include "LaunchHelp.h"
// lang.h
#include "newlang.h"
// message requests
#define wm_ViewRestart (WM_USER + 100)
// test
#define wm_WizRequest1 (WM_USER + 101)
#define wm_WizRequest2 (WM_USER + 102)
#define wm_WizRequest3 (WM_USER + 103)
// char[] dynamiques
#define dynstrcpy(dest,src) { \
if (dest) free(dest);\
dest=(char*) malloc(strlen(src)+1);\
if (dest)\
strcpy(dest,src);\
}
#define dynclear(dest) { if (dest) { free(dest); dest=NULL; }}
typedef struct {
char nom[1000];
char fichier[256];
char etat[20];
char url_sav[HTS_URLMAXSIZE*2]; // pour cancel
char url_adr[HTS_URLMAXSIZE*2];
char url_fil[HTS_URLMAXSIZE*2];
LLint size;
LLint sizetot;
int offset;
//
int back;
//
int actived; // pour disabled
} t_StatsBuffer;
typedef struct {
int ask_refresh;
int refresh;
LLint stat_bytes;
int stat_time;
int lien_n;
int lien_tot;
int stat_nsocket;
int rate;
int irate;
int ft;
LLint stat_written;
int stat_updated;
int stat_errors;
int stat_warnings;
int stat_infos;
TStamp stat_timestart;
int stat_back;
} InpInfo;
/* WinHTTrack mutex */
extern HANDLE WhttMutex;
#define WHTT_LOCK() WaitForSingleObject(WhttMutex,INFINITE)
#define WHTT_UNLOCK() ReleaseMutex(WhttMutex)
/* Location */
extern char* WhttLocation;
#define WHTT_LOCATION(a) WhttLocation=(a)
// fonctions moteur
int __cdecl httrackengine_check(char* adr,char* fil,int status);
void __cdecl httrackengine_init();
void __cdecl httrackengine_uninit();
int __cdecl httrackengine_start(void* dummy);
int __cdecl httrackengine_end();
int __cdecl httrackengine_htmlcheck(char* html,int len,char* url_adresse,char* url_fichier);
int __cdecl httrackengine_chopt(void* opt);
int __cdecl httrackengine_loop(void* _back,int back_max,int back_index,int lien_n,int lien_tot,int stat_time,hts_stat_struct* stats);
char* __cdecl httrackengine_query(char* question);
char* __cdecl httrackengine_query2(char* question);
char* __cdecl httrackengine_query3(char* question);
void __cdecl httrackengine_pause(char* lockfile);
// profile
int Save_current_profile(int ask);
//
int MyGetProfileInt(CString path,CString dummy,CString name,int value);
int MyGetProfileIntFile(FILE* fp,CString dummy,CString name,int value);
int MyWriteProfileString(CString path,CString dummy,CString name,CString value);
int MyWriteProfileStringFile(FILE* fp,CString dummy,CString name,CString value);
CString MyGetProfileStringFile(FILE* fp,CString dummy,CString name,CString value);
CString MyGetProfileString(CString path,CString dummy,CString name,CString value="");
void Write_profile(CString path,int load_path);
void Read_profile(CString path,int load_path);
int MyWriteProfileInt(CString path,CString dummy,CString name,int value);
int MyWriteProfileIntFile(FILE* fp,CString dummy,CString name,int value);
void Build_TopIndex(BOOL check_empty=TRUE);
void InitRAS();
// Gestion rΘpertoires
int CheckDirInfo(CString path);
BOOL RemoveEmptyDir(CString path);
// RAS //
/*
#include "Ras.h"
typedef unsigned long (* t_RasHangUp)(HRASCONN);
*/
// RAS END //
/* lang extensions */
void SetCombo(CWnd* _this,int id,char* lang_string);
// HTTrack params - pour le multithread interface/robot
class HTTrack_Params {
public:
int argc;
char** argv;
//
int* result;
};
typedef struct {
int argc;
char** argv;
} Robot_params;
// Lancement du miroir
BOOL LaunchMirror();
#define NStatsBuffer 14
/////////////////////////////////////////////////////////////////////////////
// CShellApp:
// See Shell.cpp for the implementation of this class
//
//class CShellApp : public CWinApp
class CShellApp
{
public:
CShellApp();
void init_lance();
CString end_path;
CString end_path_complete;
/*
int suivant0(void);
int suivant1(void);
int suivant2(void);
//int suivant3(void);
int suivant4(void);
*/
void OptPannel();
//BOOL InitInstance();
/*
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CShellApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CShellApp)
afx_msg void OnAppAbout();
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
*/
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SHELL_H__ED81E637_E017_11D1_A97E_006097BC6150__INCLUDED_)